{extend name="userBase" /}
{block name="body"}
<header class="hui-header">
    <div id="hui-back"></div>
    <h1 style="color:#3f3f3f">绑定手机</h1>
    <div id="hui-header-menu"  onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap mb52">
    {if condition="empty($userInfo.mobile)"}
    <form class="hui-form" action="{:request()->url()}" method="post">
        <div class="hui-form-items">
            <div class="hui-form-items-title">手机号码</div>
            <input type="text" class="hui-input hui-input-clear"  id="mobile" name="mobile" lay-verify="required|phone"  placeholder="请输入手机号" />
        </div>
        <div class="hui-form-items" style="padding: 4px 10px 0px 10px">
            <div class="hui-form-items-title mt10">手机验证码</div>
            <input type="text" id="phoneCode"  name="codeverify"  class="hui-input mt10"  lay-verify="required" maxlength="6" />
            <div style="width:240px;height:45px;">
                <input type="button" class="layui-btn layui-btn-primary getPhoneCode generate_code " value=" 获取验证码" style="float:right;" url="{:url('api/author/regCode')}">
            </div>
        </div>
        <button type="button"  class="hui-button hui-button-large hui-primary"  lay-submit="" lay-filter="*" style="margin-top:15px;">绑定</button>
    </form>
    {else /}
    <form class="hui-form" action="" method="post">
        <div class="hui-form-items">
            <div class="hui-form-items-title">已绑手机</div>
            <input type="text" class="hui-input hui-input-clear" value="{$userInfo.mobile}" disabled="undisabled" />
        </div>
    </form>
    {/if}
</div>
{/block}
{block name="js"}
<script src="__JS__/layui.base.js"></script>
{/block}